<%@page import="com.dems.dao.AdministratorDao"%>
<%@page import="com.dems.domain.Administrator"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="javax.servlet.http.HttpSession" %>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="css/info_update.css"/>
		<title>修改个人信息</title>
	</head>
	<body style="background-color:#9932CD">
	<%
        Administrator administrator = (Administrator)request.getSession().getAttribute("administrator");
        String administratorNum = administrator.getAdministratorNum();
        AdministratorDao ad = new AdministratorDao(); 
        Administrator a = ad.selectOne(administratorNum);
        	%>
	 <form action="<%=request.getContextPath() %>/UpdateAdminServlet" method="POST">
	 	<table>
			<tr>
				<td>
					账号
				</td>
				<td>
					<input type="text" name="administratorNum" value="<%=a.getAdministratorNum() %>" readonly="readonly">
				</td>
			</tr>
			<tr>
				<td>
					姓名
				</td>
				<td>
					<input type="text" name="administratorName" value="<%=a.getAdministratorName() %>">
				</td>
			</tr>
			<tr>
				<td>
					密码
				</td>
				<td>
					<input type="text" name="administratorPassword" value="<%=a.getAdministratorPassword() %>">
				</td>
			</tr>
			<tr>
				<td>
					宿舍号
				</td>
				<td>
					<input type="text" name="buildingId" value="<%=a.getBuildingId() %>">
				</td>
			</tr>
			<tr>
				<td>
					手机号
				</td>
				<td>
					<input type="text" name="administratorPhone" value="<%=a.getAdministratorPhone() %>">
				</td>
			</tr>
		</table>
		<div class="test"><input id="btn" type="submit" value="修改"/></div>
		
      </form>
	</body>
</html>